package com.xww.stock.controller;

import com.xww.common.base.ResultData;
import com.xww.stock.service.feign.FeignStockService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName FeignStockController
 * @Description
 * @Date 2022/1/7 13:36
 **/
@RestController
@RequestMapping("/stock")
@Api(tags = "远程库存")
public class FeignStockController {

    @Autowired
    private FeignStockService feignStockService;

    @ApiOperation(value = "库存数量")
    @RequestMapping(value = "/count",method = RequestMethod.GET)
    public ResultData stock(){
        return feignStockService.CountStock();
    }
}
